package cadc.ping;


import cadc.actions.UserAction;
import cadc.daos.PingDao;
import cadc.models.Ping;

@SuppressWarnings("serial")
public class AddPing extends UserAction {
	private int ping0;
	private int ping1;
	private int ping2;
	private int ping3;
	private int ping4;
	private int ping5;
	private String pingyu;
	private PingDao pingDao;
	private String info;
	private int groupId;

	public String execute(){
			Ping ping = new Ping();
			int[] pings = new int[6];
			pings[0]=ping0;
			pings[1]=ping1;
			pings[2]=ping2;
			pings[3]=ping3;
			pings[4]=ping4;
			pings[5]=ping5;
			ping.setPings(pings);
			ping.setPingyu(pingyu);
			//pingDao.addPing(ping, groupId, (int) super.getAccount().getId());
			setInfo(SUCCESS);
			return SUCCESS;
	}

	public void setPingDao(PingDao pingDao) {
		this.pingDao = pingDao;
	}
	public PingDao getPingDao() {
		return pingDao;
	}
	public void setInfo(String info) {
		this.info = info;
	}
	public String getInfo() {
		return info;
	}
	public void setGroupId(int groupId) {
		this.groupId = groupId;
	}
	public int getGroupId() {
		return groupId;
	}

	public void setPing0(int ping0) {
		this.ping0 = ping0;
	}

	public int getPing0() {
		return ping0;
	}

	public void setPing1(int ping1) {
		this.ping1 = ping1;
	}

	public int getPing1() {
		return ping1;
	}

	public void setPing2(int ping2) {
		this.ping2 = ping2;
	}

	public int getPing2() {
		return ping2;
	}

	public void setPing3(int ping3) {
		this.ping3 = ping3;
	}

	public int getPing3() {
		return ping3;
	}

	public void setPing4(int ping4) {
		this.ping4 = ping4;
	}

	public int getPing4() {
		return ping4;
	}

	public void setPing5(int ping5) {
		this.ping5 = ping5;
	}

	public int getPing5() {
		return ping5;
	}

	public void setPingyu(String pingyu) {
		this.pingyu = pingyu;
	}

	public String getPingyu() {
		return pingyu;
	}
}
